cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
project(primitives_library VERSION 1.0.0 LANGUAGES C)
add_library(primitives_library SHARED
        primitives.c
        primitives.def
        include/dart_api_dl.c
)

#add_executable(hello_binary src/main.cpp)
#/home/long/snap/flutter/common/flutter/bin/cache/dart-sdk/include/dart_api.h
#target_include_directories(primitives_library PUBLIC /home/long/snap/flutter/common/flutter/bin/cache/dart-sdk/include)
include_directories(include)
set_target_properties(primitives_library PROPERTIES
        PUBLIC_HEADER primitives.h
        VERSION ${PROJECT_VERSION}
        SOVERSION 1
        OUTPUT_NAME "primitives"
        XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Hex_Identity_ID_Goes_Here"
)
target_compile_definitions(primitives_library PUBLIC DART_SHARED_LIB)
#链接第三方库，我这里用到了opencv
#find_package( OpenCV REQUIRED )

#target_link_libraries( project ${OpenCV_LIBS} )
#target_compile_options(project PRIVATE -std=c++14)